Decorator pattern

美 [ˈdekəreɪtər ˈpætərn]英 [ˈdekəreɪtə(r) ˈpætn]
  • 网络装饰模式;装饰者模式;修饰模式
Decorator patternDecorator pattern
  1. The general " decorator pattern " is a design pattern that allows adding new behavior to an existing component dynamically .

    一般的“装饰模式”是一种设计模式,允许动态地向现有组件添加新的行为。

  2. By using the Decorator pattern , it is simple to separate the code that performs invocations from the code that provides caching itself .

    通过使用装饰模式,实现执行调用的代码与提供缓存的代码相分离,将非常简单。

  3. Research and Application of Decorator Pattern

    Decorator模式的研究及应用

  4. The Gang of Four book defines the Decorator pattern as

    四人组的书籍将修饰符模式定义为

  5. Indeed , the Decorator pattern is the way out of this mess .

    确实,装饰器模式是避免这种情况的好方法。

  6. The Strategy pattern can be used to implement operations'variability , and the Decorator pattern can be used to implement parameters'variability .

    Strategy模式可用于实现操作的可变性,Decorator模式可用于实现参数的可变性。

  7. Enter the Decorator pattern , which can add a capability uniformly to any Widget .

    我们进入有能够统一增加(一些特性)能力的装饰器模式。

  8. First , I 'll show a traditional implementation of the Decorator pattern in Groovy , then make it more dynamic in subsequent examples .

    首先,我将演示修饰符模式在Groovy中的传统实现,然后再在后续示例中提高它的动态性。

  9. Enter the decorator pattern , which allows you to add this functionality onto the AutomobileModel in a nice , clean class .

    进入装饰器模式,该模式允许您通过一个优秀整洁的类将此功能添加到AutomobileModel。

  10. Both are based on the Decorator design pattern and utilize JUnit 's suite mechanism .

    这两种类型都基于Decorator设计模式并利用JUnit的suite机制。

  11. The decorator process pattern does not only apply to human tasks , however , it can also be applied to allow time-based versioning for any type of long-running , asynchronous service .

    然而,装饰流程模式不仅适用于人工任务,还可以应用它来对任何类型的长时间运行的异步服务进行基于时间的版本管理。

  12. Decorator is a structural pattern that defines a wrapper for caching , publishing , and exchanging service assertions used for connecting to appropriate services and re-utilizing proxy classes .

    装饰(Decorator)模式是一种结构模式,它定义了缓存、发布与交换服务声明的封装器,用于连接合适服务与可重用的代理类。